<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="java.util.Enumeration,java.util.Objects" %>
<!DOCTYPE html>
<html>
<head>
<title>隐含对象config</title>
</head>
<body>
  config是实现ServletConfig接口的实例<br>
  <%="遍历config中的所有初始化参数的名称及其值<br>"%>
  <%
      Enumeration<String> names = config.getInitParameterNames();
      while (names.hasMoreElements()) {
          String name = names.nextElement();
          String value = config.getInitParameter(name);
          if (Objects.nonNull(value)) {
              out.print(name + "：" + value + "<br>");
          }
      }
  %>
</body>
</html>
